package com.banksystem.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import com.banksystem.entity.Money;
import com.banksystem.entity.News;

public interface Stjfmapper {
	
	@Select("insert into money (gname,usea,count,date,content) values (#{gname},#{use},#{count},#{date},#{content})")
	public void addjf(@Param("gname")String gname,@Param("use")String use,@Param("count")String count,@Param("date")String date,@Param("content")String content);
	
	@Select("select * from money where gname=#{gname}")
	public List<Money> findMoneyAll(@Param("gname")String gname);
	
	@Delete("delete from money where id=#{id}")
	public void deletemoney(@Param("id")String id);
	
	@Select("select * from money where gname like'%${gname}%' and ( gname like'%${seach}%' or usea like'%${seach}%' or id like'%${seach}%' or count like'%${seach}%' or date like'%${seach}%')")
	public List<Money> findmoneyAlllike(@Param("seach")String seach,@Param("gname")String gname);

}
